package com.sharemarking.wa.platform.controller;

import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.platform.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dxy
 */
@RequestMapping("company")
@RestController
public class CompanyController {
    @Autowired
    private CompanyService companyService;

    /**
     * 获取公司信息
     * @return
     * @throws Exception
     */
    @RequestMapping("getInfo")
    public ResponseParams<?> getInfo() throws Exception {
        return companyService.getInfo();
    }

    /**
     * 获取车辆列表
     * @return
     * @throws Exception
     */
    @RequestMapping("getCarList")
    public ResponseParams<?> getCarList() throws Exception {
        return companyService.getCarList();
    }

    /**
     * 获取司机列表
     * @return
     * @throws Exception
     */
    @RequestMapping("getDriverList")
    public ResponseParams<?> getDriverList() throws Exception {
        return companyService.getDriverList();
    }


}
